Skip to main content

All Questions

8votes
3answers
7kviews

Is it good practice to make everything internal in C#?

In our solution we have a couple of projects, a project for data layer, service layer, business layer. etc. Inside the business layer, we use models to transfer data from classes to classes. Is it ...
Tvde1's user avatar
2votes
5answers
1kviews

What should a constructor contain?

What should a constructor contain? In both cases, all three arguments are needed for the class to work. Which approach is better and why? 1) class Language { LanguageRepository ...
jarer's user avatar
9votes
7answers
8kviews

Checking if a method returns false: assign result to temporary variable, or put method invocation directly in conditional?

Is it a good practice to call a method that returns true or false values in an if statement? Something like this: private void VerifyAccount() { if (!ValidateCredentials(txtUser.Text, txtPassword....
KyelJmD's user avatar

close